home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1996, 1997 Meta Four Software. All rights reserved.
- //
- // This is the simplified header for use with the MetaKit library.
- //
- // There is no point in exporting the bulky and complex conditional header
- // structure used within the library itself, but the definitions below will
- // have to be changed substantially to support new compilers, etc.
- //
- //! rev="$Id: k4conf.h,v 1.20 1997/06/06 15:08:23 jcw Rel $"
-
- #ifndef __K4CONF_H__
- #define __K4CONF_H__
-
- // Microsoft C++ prefers MFC, everyone else defaults to Universal version
- #if !_MSC_VER && !q4_MFC && !q4_STD && !defined (q4_UNIV)
- #define q4_UNIV 1
- #endif
-
- // by default, if MFC is linked as a DLL, then so is MetaKit
- #if defined (_AFXDLL) && !defined (q4_KITDLL)
- #define q4_KITDLL _AFXDLL
- #endif
-
- // omit floating point in small model 16-bit Intel builds
- #if defined (_DOS) && defined (_M_I86SM) && !defined (q4_TINY)
- #define q4_TINY 1
- #endif
-
- // and here's the other end of the scale... Alpha has 64-bit longs
- #if defined (__alpha) && !defined (q4_LONG64)
- #define q4_LONG64 1
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
-
- // Borland C++ and C++ Builder
- #if defined (__BORLANDC__)
- // by default, if runtime is linked as a DLL, then so is MetaKit
- #if defined (_RTLDLL) && !defined (q4_KITDLL)
- #define q4_KITDLL 1
- #endif
-
- // use explicit import specifier if MetaKit is in a DLL
- #if q4_KITDLL && !defined (q4_EXPORT)
- #define q4_EXPORT 1
- #define d4_DLLSPEC(t) t // only class _import in BC 4.52 (?)
- #endif
-
- // Borland 5.0 supports the bool datatype
- #if __BORLANDC__ >= 0x500
- #define q4_BOOL 1
- #endif
- #endif
-
- // Metrowerks CodeWarrior
- #if defined (__MWERKS__)
- #if __option(bool)
- #define q4_BOOL 1 // bool datatype is optionally supported
- // undef, these conflict with c4_Storage::c4_Storage overloading
- #undef bool
- #undef true
- #undef false
- #endif
- #endif
-
- // Microsoft Visual C++
- #if defined (_MSC_VER)
- // MSVC 4.0 can specify the library it needs to link here
- #if _MSC_VER >= 1000 && !defined(_MAC)
- #if q4_STD
- #if q4_KITDLL
- #ifdef _DEBUG
- #pragma comment(lib, "mk4nvsyd.lib")
- #else
- #pragma comment(lib, "mk4nvsy.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "mk4nvssd.lib")
- #else
- #pragma comment(lib, "mk4nvss.lib")
- #endif
- #endif
- #elif q4_UNIV
- #if q4_KITDLL
- #ifdef _DEBUG
- #pragma comment(lib, "mk4nvuyd.lib")
- #else
- #pragma comment(lib, "mk4nvuy.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "mk4nvusd.lib")
- #else
- #pragma comment(lib, "mk4nvus.lib")
- #endif
- #endif
- #else // q4_MFC
- #if q4_KITDLL
- #ifdef _DEBUG
- #pragma comment(lib, "mk4nvmxd.lib")
- #else
- #pragma comment(lib, "mk4nvmx.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "mk4nvmsd.lib")
- #else
- #pragma comment(lib, "mk4nvms.lib")
- #endif
- #endif
- #endif
- #endif
-
- // MSVC 5.0 supports the bool datatype, MSVC 4.x has no namespaces
- #if _MSC_VER >= 1100
- #define q4_BOOL 1
- #else
- #define q4_NO_NS 1
- #endif
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // Other definitions needed by the public MetaKit library header files
-
- #if !q4_BOOL && !q4_STD // define a bool datatype
- #define false 0
- #define true 1
- #define bool int
- #endif
-
- #if q4_EXPORT // add declaration specifiers
- #include "k4dll.h"
- #endif
-
- #if q4_INLINE // enable inline expansion
- #define d4_inline inline
- #else
- #define d4_inline
- #endif
-
- #if q4_NO_NS // don't use namespaces
- #define d4_std
- #else
- #define d4_std std
- #endif
-
- typedef unsigned char t4_byte; // create typedefs for t4_byte, etc.
- #if q4_LONG64
- typedef int t4_i32; // if longs are 64b, then int must be 32b
- typedef unsigned t4_u32;
- #else
- typedef long t4_i32; // if longs aren't 64b, then they are 32b
- typedef unsigned long t4_u32;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // Framework classes
-
- #if q4_STD // STL and standard strings
-
- #include "m4wrap.h"
-
- typedef c4_ArrayT<void*> c4_PtrArray;
-
- #include <stdio.h>
- typedef FILE c4_File;
-
- #elif q4_UNIV // Universal replacement classes
-
- #ifdef _MSC_VER
- #pragma warning(disable: 4100 4127 4135 4244 4511 4512 4514)
- #endif
-
- #include "m4string.h"
- #include "m4coll.h"
-
- #include <stdio.h>
- typedef FILE c4_File;
-
- #else // q4_MFC // Microsoft Foundation Classes
-
- #ifdef _WINDOWS
- #include <afxwin.h>
- #else
- #include <afxcoll.h>
- #endif
-
- typedef class CFile c4_File;
- typedef class CString c4_String;
- typedef class CPtrArray c4_PtrArray;
-
- // MSVC 1.52 thinks a typedef has no constructor, use define instead
- #if _MSC_VER == 800
- #define c4_String CString
- #endif
-
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
-
- #endif
-